package edu.sctu.practice.class01.zhangwang.day2015_10_29.test18;

/**
 * Created by Z_W on 2015/11/1.
 */
public class Auto {
    public int tireNumber;
    public String color;
    public int weight;
    public int speed;

    public Auto(int speed, int tireNumber) {
        this.speed = speed;
        this.tireNumber = tireNumber;
    }

    public Auto(int tireNumber, String color, int weight, int speed) {
        this.tireNumber = tireNumber;
        this.color = color;
        this.weight = weight;
        this.speed = speed;
    }

    public void speedUp(){
        speed += 5;
        System.out.println("加速后的速度为："+speed);
    }

    public void speedDown(){
        speed -= 5;
        System.out.println("减速后速度为："+speed);
    }
}
